@import './variables.scss';

.l-pagination {
  font-size: 13px;
}

.is-current_page {
  color: $border-color-active;
}

.l-pagination_pager,
.l-pagination_prev,
.l-pagination_next,
.l-pagination_total,
.l-pagination_sizes,
.l-pagination_jumper {
  height: 28px;
  display: inline-block;
  line-height: 28px;
  margin: 0 8px;
}

.l-pagination:first-child {
  margin-left: 0;
}


.l-pagination_rightWrapper {
  float: right;
}

// sizes
.l-pagination_sizes {
  .l-select {
    width: 100px;
    display: inline-block;
    .l-select-inner {
      text-align: center;
    }
    .l-input_inner {
      height: 28px;
    }
  }
}

// pager
.l-pagination_pager {
  display: inline-block;
  font-weight: 500;
  margin: 0;
  .pager-number,
  .pager-prev,
  .pager-next {
    width: 30px;
    height: 100%;
    text-align: center;
    display: inherit;
    line-height: inherit;
    cursor: pointer;
    user-select: none;
    &:hover {
      color: $border-color-active;
    }
    &.is-current_page {
      cursor: unset;
    }
  }
}

// pager -> background
.is-background {
  .pager-number.is-current_page {
    color: #fff;
    background-color: $border-color-active;
  }
  .pager-next,.pager-number,.pager-prev,.l-pagination_prev,.l-pagination_next{
    background-color: rgb(245, 245, 245);
    margin: 0 4px;
    border-radius: 2px;
  }
}


// prev
.l-pagination_prev {
  transform: rotate(180deg);
  display: inline-block;
}

.l-pagination_prev, .l-pagination_next {
  text-align: center;
  width: 30px;
  font-weight: bold;
  &:not(.is-disabled) {
    cursor: pointer;
  }
}

// jumper
.l-pagination_jumper {
  .l-input {
    display: inline-block;
    width: 50px;
    .l-input_inner {
      height: 28px;
      line-height: 28px;
      text-align: center;
    }
  }
}

// icon
.l-pagination_prev, .l-pagination_next, .pager-prev, .pager-next {
  font-size: 12px;
}

// disabled
.l-pagination.is-disabled .pager-btn{
  &:not(.is-current_page):hover {
    color: unset;
  }
  cursor: not-allowed;
}